export const saveSessionString = (key, value) => {
	sessionStorage.setItem(key, value)
}

export const getSessionString = (key) => {
	return sessionStorage.getItem(key)
}

export const saveSessionObject = (key, value) => {
	sessionStorage.setItem(key, JSON.stringify(value))
}

export const getSessionObject = (key) => {
	return JSON.parse(sessionStorage.getItem(key))
}

export const removeSession = (key) => {
	return sessionStorage.removeItem(key)
}

export const getStorageToken = () => {
	return getSessionObject('user')?.token
}
